package com.xposed.aliproxy.rxjavademo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.xposed.aliproxy.rxjavademo.looper.PollingActivity;
import com.xposed.aliproxy.rxjavademo.search.SearchActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.looper_act).setOnClickListener(this);
        findViewById(R.id.search_act).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.looper_act:
                startActivity(new Intent(this, PollingActivity.class));
                break;
            case R.id.search_act:
                startActivity(new Intent(this, SearchActivity.class));
                break;
        }

    }
}
